package cn.juque.methodfactory;

import cn.juque.methodfactory.factory.SuperFactory;
import cn.juque.methodfactory.service.ModelEnum;
import cn.juque.simplefactory.product.Tesla;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>MainMethod</li>
 * </ul>
 * @date 2023-06-11 14:53:53
 **/
public class MainMethod {

    public static void main(String[] args) {
        Tesla tesla = SuperFactory.createCar(ModelEnum.MODEL_3.getModel());
        System.out.println("create a tesla:" + tesla.getName());
        tesla = SuperFactory.createCar(ModelEnum.MODEL_Y.getModel());
        System.out.println("create a tesla:" + tesla.getName());
    }
}
